function isJson(resource) {
    return resource.type === PIXI.loaders.Resource.TYPE.JSON;
}

export function paserAdobeAnimate() {
    return function (resource, next) {
        if (!resource.data ||
            !isJson(resource) ||
            !resource.data.ANIMATION ||
            !resource.data.SYMBOL_DICTIONARY) {
            return next();
        }
        var baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1);
        var atlasPath = baseUrl + 'spritemap.json';
        if (resource.metadata && resource.metadata.atlasFile) {
            atlasPath = resource.metadata.atlasFile;
        }
        var atlasOptions = {
            crossOrigin: resource.crossOrigin,
            xhrType: PIXI.loaders.Resource.XHR_RESPONSE_TYPE.JSON,
            metadata: metadata.atlasMetadata || null,
            parentResource: resource
        };
        var imageOptions = {
            crossOrigin: resource.crossOrigin,
            metadata: metadata.imageMetadata || null,
            parentResource: resource
        };
        this.add(resource.name + '_atlas', atlasPath, atlasOptions, function (atlasResource) {
            
        })
    };
}